﻿<%@ Page Title="" Language="C#" MasterPageFile="/Common/Master.master" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentForm" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentHtml" runat="Server">
    <div id="toolBar" style="display: none;">
        <div id="toolbarAdd" style="display: none;" data-options="iconCls:'icon-table_add',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Insert(obj)">添加</div>
        <div id="toolbarEdit" style="display: none;" data-options="iconCls:'icon-table_edit',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Update(obj)">修改</div>
        <div id="toolbarDelete" style="display: none;" data-options="iconCls:'icon-table_delete',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Delete(obj)">删除</div>
        <div id="toolbarAddUser"    data-options="iconCls:'icon-table_add',plain:'true'" class="easyui-linkbutton" onclick="AddUser()">添加处理人</div>
        <div id="toolbarSearchtext"></div>
    </div>
    <div id="page"></div>
    <table id="dg1" style="display: none;">
        <thead>
            <tr>
               <%-- <th data-options="field: 'WorkFlowID',width: 150">工作流程ID</th>--%>
                <th data-options="field: 'StepIndex',width: 150">步骤</th>
                <th data-options="field: 'PStepIndex',width: 150">上一步（如果两个节点 **,**）</th>
                <th data-options="field: 'Requirement',width: 150">条件（简单的 0 , 1 区分）</th>
                <th data-options="field: 'Name',width: 150">流程名称</th>
                <th data-options="field: 'OrgOrPerson',width: 150">部门还是人负责处理（0 人 1 部门）</th>
                <th data-options="field: 'Description',width: 150">备注</th>
                <th data-options="field: 'AddTime',width: 150,formatter:function(val,rec){ return $.DateFormat(val, 'yyyy-MM-dd HH:mm:ss'); }">创建时间</th>
             <%--   <th data-options="field: 'AddUserID',width: 150">创建人ID</th>
                <th data-options="field: 'OrgID',width: 150">组织机构ID</th>--%>

            </tr>
        </thead>
    </table>

    <script type="text/javascript">
        var obj;
        $(function () {
            obj = {
                id: "dg1",
                key: "ID",
                url: "Api/V1/System_WorkFlowDetailed/GetPagesWorkFlowDetailed",
                deleteUrl: "Api/V1/System_WorkFlowDetailed/DeleteWorkFlowDetailed",
                data: {},

                //title: "流程详细表管理",
                dialogName: "流程详细表管理",
                dialogWidth: Cookies.get('DialogWidth') + "px",
                dialogHeight: Cookies.get('DialogHeight') + "px",
                editUrl: "/WorkFlow/System_WorkFlowDetailed/edit.aspx?WorkFlowID=" + $.getUrlParamer("WorkFlowID"),
                detailsUrl: "/WorkFlow/System_WorkFlowDetailed/details.aspx?WorkFlowID=" + $.getUrlParamer("WorkFlowID"),
                toolBar: '#toolBar',
                footer: '#page',
                callback: function () { $.fn.DataGrid.onRefresh(obj); }
            };
            $.fn.DataGrid.DataBind(obj);
        });

        function AddUser() {
            var row = $('#dg1').datagrid('getSelected');
            if (row != null) {
                var _url = "/WorkFlow/System_WorkFlowDetailedCharge/Index.aspx?WorkFlowDetailedID=" + row[obj.key];
                $.layerOpen({ title: "添加处理人", width: Cookies.get('DialogWidth') + "px", height: Cookies.get('DialogHeight') + "px", url: _url, callback: function () { } });
            } else {
                $.messager.alert('提示信息', '您还没有选择任何记录！', 'info');
            }
        }
    </script>
</asp:Content>

